<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>15.layui分页器</title>
        <link rel="stylesheet" href="static/layui-2.5.6/css/layui.css">
    </head>
    <body>
        <div class="layui-container">
            <div class="layui-row layui-col-lg8 layui-col-lg-offset2">
                <div id="test1"></div>
            </div>
        </div>

        <script src="static/layui-2.5.6/layui.js"></script>
        <script>
            layui.use('laypage', function () {
                var laypage = layui.laypage;

                // 执行一个laypage实例
                laypage.render({
                    elem: 'test1',  // 注意, 这里的test1是ID, 不用加#号, 绑定容器id
                    count: 50  // 数据总数, 从服务端得到
                });
            });
        </script>
    </body>
</html>
